package org.jgs1904.apachepoidemo.poi;

import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * @author: 默苍璃
 * @date: 2023-10-09 11:39
 */
public class CreatWorkBook {

    public static void main(String[] args) {
        Workbook wb = new XSSFWorkbook();
        try (OutputStream fileOut = new FileOutputStream("D:\\temp\\workbook.xlsx")) {
            wb.write(fileOut);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

}
